-
Notifications
You must be signed in to change notification settings - Fork 55
refactor: replace linc_luajit with hxluajit #1299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This will need EXTENSIVE testing btw to make sure most mods still work and such, because despite it still being luaJIT, it's an different implementation
|
I've also heard this was better over |
|
same as the first lua refactor: |
So no difference essentially, gotcha then |
HomuHomu833
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static function addCallback(l:State, name:String, func:Dynamic)
{
- // PsychLua expects the function to be null for local callbacks, too lazy to do something about that
- if (Type.typeof(func) != TFunction || func == null)
- return;
-
- callbacks.set(name, func);
+ // PsychLua expects the function to be null for local callbacks so if func is not TFunction we don't add the callback here
+ if (Type.typeof(func) == TFunction)
+ callbacks.set(name, func);
Lua.pushstring(l, name);
Lua.pushcclosure(l, cpp.Callable.fromStaticFunction(handleCallback), 1);Simplifies the addCallback method by only adding the callback if the provided function is of type TFunction, aligning with PsychLua's expectations and removing unnecessary null checks. Co-Authored-By: Homura <[email protected]>
|
@JordanSantiagoYT try it now I guess |
What does this have to do with the PR? |
|
I might just merge this just because of two reasons, as I've said before, |
This will need EXTENSIVE testing btw to make sure most mods still work and such, because despite it still being luaJIT, it's an different implementation